
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> rm(list=ls())
> 
> # Script to run QAP
> library(sna)
Loading required package: statnet.common

Attaching package: 'statnet.common'

The following object is masked from 'package:base':

    order

Loading required package: network
network: Classes for Relational Data
Version 1.16.1 created on 2020-10-06.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
                    Mark S. Handcock, University of California -- Los Angeles
                    David R. Hunter, Penn State University
                    Martina Morris, University of Washington
                    Skye Bender-deMoll, University of Washington
 For citation information, type citation("network").
 Type help("network-package") to get started.

sna: Tools for Social Network Analysis
Version 2.6 created on 2020-10-5.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.

> 
> # Load the followers adjacency matrix
> y <- readRDS("processed_data/followers_adjacencyMatrix.Rds")
> # Load the predicting matrix 
> load("processed_data/QAP_predicting_matrices_2.RData")
> 
> # Non Parallel implementation to run QAP
> start.time <- Sys.time()
> # Set seed value 
> seed_value <- 25
> set.seed(seed_value)
> # Run netlm
> qap_res <- netlogit(y, predicting_matrices, reps = 5)
> end.time <- Sys.time()
> time.taken <- end.time - start.time
> time.taken
Time difference of 1.679586 days
> 
> # Save results 
> file_name <- paste0("output/qap_res_followers_out", seed_value, ".Rds")
> saveRDS(qap_res, file=file_name)
> 
> proc.time()
     user    system   elapsed 
115198.42  30046.86 145246.91 
